/*    This file is part of Nephite Exchange.
 *
 *    Nephite Exchange is free software: you can redistribute it and/or modify
 *    it under the terms of the GNU General Public License as published by
 *    the Free Software Foundation, either version 3 of the License, or
 *    (at your option) any later version.
 *
 *    Nephite Exchange is distributed in the hope that it will be useful,
 *    but WITHOUT ANY WARRANTY; without even the implied warranty of
 *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *    GNU General Public License for more details.
 *
 *    You should have received a copy of the GNU General Public License
 *    along with Nephite Exchange.  If not, see <http://www.gnu.org/licenses/>.
 */

package com.icub3d.nephiteexchange.client;

import com.google.gwt.user.client.ui.HorizontalPanel;
import com.google.gwt.user.client.ui.Hyperlink;

public class LinksPanel extends HorizontalPanel {

	Hyperlink convertLink = new Hyperlink("Convert", "convert");
	Hyperlink exchangesLink = new Hyperlink("Exchanges", "exchanges");
	Hyperlink aboutLink = new Hyperlink("About", "about");
	Hyperlink contactLink = new Hyperlink("Contact", "contact");
	
	public LinksPanel () {
		convertLink.addStyleName("convertLink");
		exchangesLink.addStyleName("exchangesLink");
		aboutLink.addStyleName("aboutLink");
		contactLink.addStyleName("contactLink");
		addStyleName("linksPanel");
		
		add(convertLink);
		add(exchangesLink);
		add(aboutLink);
		add(contactLink);
	}
	
	public void changeLink(String value) {
		convertLink.removeStyleName("highlightedLink");
		exchangesLink.removeStyleName("highlightedLink");
		aboutLink.removeStyleName("highlightedLink");
		contactLink.removeStyleName("highlightedLink");
		
		if (value.equals("convert")) {
			convertLink.addStyleName("highlightedLink");
		} else if (value.equals("exchanges")) {
			exchangesLink.addStyleName("highlightedLink");
		} else if (value.equals("contact")) {
			contactLink.addStyleName("highlightedLink");
		} else if (value.equals("about")) {
			aboutLink.addStyleName("highlightedLink");
		}
		
	}
	
}
